﻿using System.Windows.Input;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using dpa.Library.Models;

namespace dpa.Library.ViewModels;

public partial class FilterViewModel(QueryViewModel queryViewModel) : ObservableObject
{
    [ObservableProperty] private FilterType _type = FilterType.NameFilter;

    [ObservableProperty] private string _content;

    [RelayCommand]
    private void Add() => queryViewModel.AddFilterViewModel(this);

    [RelayCommand]
    private void Remove() => queryViewModel.RemoveFilterViewModel(this);
}